﻿@model ServicePoxry.AWServiceReference.Employee
 <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script> 
<link href="@Url.Content("~/Content/themes/base/jquery-ui-1.8.6.custom.css")" rel="stylesheet" type="text/css" />
<div class="editor-label">
    @Html.LabelFor(model => model.NationalIDNumber)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.NationalIDNumber)
    @Html.ValidationMessageFor(model => model.NationalIDNumber)
</div>
<div class="editor-label">
    @Html.DropDownList("ContactID", String.Empty)
    @Html.ValidationMessageFor(model => model.ContactID)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.ContactID)
    @Html.ValidationMessageFor(model => model.ContactID)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.LoginID)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LoginID)
    @Html.ValidationMessageFor(model => model.LoginID)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.ManagerID, "Employee2")
</div>
<div class="editor-field">
    @Html.DropDownList("ManagerID", String.Empty)
    @Html.ValidationMessageFor(model => model.ManagerID)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.Title)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Title)
    @Html.ValidationMessageFor(model => model.Title)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.BirthDate)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.BirthDate)
    @Html.ValidationMessageFor(model => model.BirthDate)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.MaritalStatus)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.MaritalStatus)
    @Html.ValidationMessageFor(model => model.MaritalStatus)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.Gender)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Gender)
    @Html.ValidationMessageFor(model => model.Gender)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.HireDate)
</div>
<div class="editor-field">
    @Html.TextBox("HireDate", Html.Encode(String.Format("{0:mm/dd/yyyy}", Model!=null?Model.HireDate.ToShortDateString():DateTime.Now.ToShortDateString())), new { @class = "ui-datepicker" })
    @Html.ValidationMessageFor(model => model.HireDate)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.SalariedFlag)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.SalariedFlag)
    @Html.ValidationMessageFor(model => model.SalariedFlag)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.VacationHours)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.VacationHours)
    @Html.ValidationMessageFor(model => model.VacationHours)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.SickLeaveHours)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.SickLeaveHours)
    @Html.ValidationMessageFor(model => model.SickLeaveHours)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.CurrentFlag)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.CurrentFlag)
    @Html.ValidationMessageFor(model => model.CurrentFlag)
    
</div>
<script type="text/javascript">
    $().ready(function () {
        $('.ui-datepicker').datepicker({
            dateFormat: 'mm/dd/yy',
            buttonImage: '@Url.Content("~/Content/calendar.gif")',
            buttonImageOnly: true,
            showOn: "button"
        });

        $('#Title').autocomplete({ source: '@Url.Action("GetTitle","Employee")' });

    });
</script>
